package com.mkh.st.admin.strategy;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.List;

@Component
public class ScopeContext implements Context{

	@Autowired
	List<BaseScopeStrategy> list;

	@Override
	public BaseScopeStrategy getScopeStrategy(Long scopeId) {
		return list.stream().filter(v -> v.getKey().equals(scopeId)).findFirst().orElse(null);
	}
}
